
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)

project(intro LANGUAGES C)

include_directories(../common)

set(COMPILE_ALL OFF)

list(APPEND _sources
    ../common/error.c
    ../common/pathalloc.c
)

if (COMPILE_ALL)
add_executable(filetype 01_filetype.c ${_sources})
add_executable(access 02_access.c ${_sources})
add_executable(umask 03_umask.c ${_sources})
add_executable(changemode 04_changemode.c ${_sources})
add_executable(unlink 05_unlink.c ${_sources})
add_executable(zap 06_zap.c ${_sources})
add_executable(ftw8 07_ftw8.c ${_sources})
add_executable(mycd 08_mycd.c ${_sources})
add_executable(cdpwd 09_cdpwd.c ${_sources})
else()
add_executable(devrdev 10_devrdev.c ${_sources})
endif()
